 <%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page language="java" import="java.sql.*,java.util.Map"import = "ibm.etp.bean.*,java.util.List"import ="ibm.etp.test.*"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改资料</title>
</head>
<body bgcolor="#EEF2FB">
<h2 align="center"><font style="color:blue;font-family:华文行楷">修改员工资料</font></h2><br>
<%
	String wage;
	String ddate;
	String waddress;
	String username;

	String sql;
	ResultSet rs = null;
	List rsHi = null;

	;
	//request.getSession().setAttribute("username", User.getUsername());
	//Map session = ActionContext.getContext().getSession();
	username = (String)session.getAttribute("username");
	//String username = (String) request.getAttribute("username");
     //String username="沈业田";

	

	//sql = "select age,wdate,address from worker where username='"
		//	+ request.getSession().getAttribute("username") + "'";
	//rs = Oracle.doOracle(sql);
	//while (rs.next()) {
	//	request.getSession().setAttribute("wage", rs.getString("age"));
	//	request.getSession().setAttribute("ddate", rs.getString("wdate"));
	//	request.getSession().setAttribute("waddress", rs.getString("address"));
	//}
	
	sql="from Worker as worker where worker.username = '" + username + "'";
	rsHi=HibernateOracle.doHibernateOr(sql);
	for (int i = 0; i < rsHi.size(); i++) {
		Worker worker = (Worker) rsHi.get(i);
		request.getSession().setAttribute("wage", worker.getAge());
		request.getSession().setAttribute("ddate", worker.getWdate());
		request.getSession().setAttribute("waddress", worker.getAddress());	
	}
%>
<div align="center">${requestScope.message} 
<s:form action="userinf" method="POST">
  	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  	  <font size=4 style="color:blue;font-family:华文行楷">年  龄:</font><input type="text" name="age" value=<%=session.getAttribute("wage") %>>
	<br><br>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  	  <font size=4 style="color:blue;font-family:华文行楷">地  址:</font><input type="text" name="address"value=<%=session.getAttribute("waddress") %>>
	<br><br>
  	  <font size=4 style="color:blue;font-family:华文行楷">入职时间 :</font><input type="text" name="wdate" value=<%=session.getAttribute("ddate") %>>
	<br>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="hidden" name="action" value="select">
	<input type="submit" value="提交"/>
</s:form></div>
</body>
</html>